package org.hot100_5.leetcode183;

public class Solution {
    public void moveZeroes(int[] nums) {

        int n = nums.length;

        int fast = 0;
        int slow = 0;

        for (; fast < n; fast++) {
            if (nums[fast]!=0){
                nums[slow]=nums[fast];
                slow++;
            }
        }

        for (int i = slow; i < n ; i++) {
            nums[i]=0;
        }

    }
}
